#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    int m[100105];
    for(int i=1;i<=n;i++)
    {
        cin>>m[i];
    }
    int ans=n;
    for(int i=1;i<=n;i++)
    {
        for(int j=i;j<=n;j++)
        {
            if(m[i]>=m[j])
            {
                int t=m[i];
                m[i]=m[j];
                m[j]=t;
            }

        }
    }
    for(int i=n;i>=n/2;i--)
    {
        if(m[i]>m[n-i])
        {
            ans--;
        }
        else
        {
            break;
        }

    }
    cout<<ans;
    return 0;
}
